load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

package(default_visibility = ["//:__subpackages__"])

licenses(["notice"])

go_library(
    name = "keyset",
    srcs = [
        "binary_io.go",
        "handle.go",
        "json_io.go",
        "keyset.go",
        "manager.go",
        "mem_io.go",
        "option.go",
        "reader.go",
        "validation.go",
        "writer.go",
    ],
    importpath = "github.com/google/tink/go/keyset",
    visibility = [
        "//visibility:public",
    ],
    deps = [
        "//core/primitiveset",
        "//core/registry",
        "//internal",
        "//internal/internalapi",
        "//internal/registryconfig",
        "//proto/tink_go_proto",
        "//subtle/random",
        "//tink",
        "@org_golang_google_protobuf//encoding/protojson",
        "@org_golang_google_protobuf//encoding/prototext",
        "@org_golang_google_protobuf//proto",
    ],
)

go_test(
    name = "keyset_test",
    srcs = [
        "binary_io_test.go",
        "handle_test.go",
        "json_io_test.go",
        "keyset_test.go",
        "manager_test.go",
        "mem_io_test.go",
        "validation_test.go",
    ],
    deps = [
        ":keyset",
        "//aead",
        "//core/registry",
        "//insecurecleartextkeyset",
        "//internal/internalapi",
        "//mac",
        "//proto/common_go_proto",
        "//proto/tink_go_proto",
        "//signature",
        "//subtle/random",
        "//testing/fakekms",
        "//testkeyset",
        "//testutil",
        "//tink",
        "@org_golang_google_protobuf//proto",
    ],
)

alias(
    name = "go_default_library",
    actual = ":keyset",
    visibility = ["//visibility:public"],
)
